package edu.scau.divineplace.entity.dos;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import edu.scau.divineplace.entity.enums.IsReadEnum;
import edu.scau.divineplace.entity.enums.LikeTargetTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author x1aolone
 * @since 2020-12-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("`like`")
public class LikeDO implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 点赞者id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 被点赞者的id
     */
    @TableField("like_target_user_id")
    private Long likeTargetUserId;

    /**
     * 点赞的内容类型，1评分/2评论/3日志
     */
    @TableField("like_target_type")
    private LikeTargetTypeEnum likeTargetType;

    /**
     * 点赞的评分id/评论id/日志id
     */
    @TableField("like_target_id")
    private Long likeTargetId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 是否已读
     */
    @TableField(value = "is_read", fill = FieldFill.INSERT)
    private IsReadEnum isRead;

    /**
     * 是否删除
     */
    @TableField(value = "is_deleted", fill = FieldFill.INSERT)
    @TableLogic
    private Integer isDeleted;


}
